home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / Anwendun / Pov / POVTOOLS / FTPOVRAY / SCENES / POOL.POV < prev    next >
Encoding:
Text File  |  1995-11-25  |  7.6 KB  |  302 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2.  
  3. // By Dan Farmer
  4. /* Script for a lawn with a swimming pool.
  5.   Written by Dan Farmer.  Takes quite a while to render because of
  6.   the many textures and waveforms used.  An interesting variation of this
  7.   theme would be to change the view to look into the garden globe and see
  8.   the rest of the scene as the reflection in the globe.
  9.  
  10.   As stated below, most of the garden globe structure was taken from the
  11.   file "roman.pov".
  12. */
  13.  
  14. #include "colors.inc"
  15. #include "shapes.inc"
  16. #include "textures.inc"
  17.  
  18. #declare Cube = intersection {
  19.    plane { <0.0 0.0 1.0> 1.0 }
  20.    plane { <0.0 0.0 -1.0> 1.0 }
  21.    plane { <0.0 1.0 0.0> 1.0 }
  22.    plane { <0.0 -1.0 0.0> 1.0 }
  23.    plane { <1.0 0.0 0.0> 1.0 }
  24.    plane { <-1.0 0.0 0.0> 1.0 }
  25.    scale <1.0 1.0 1.0>
  26. }
  27.  
  28. /* Most of the garden globe is borrowed from "roman.dat"*/
  29. /********************************************************/
  30. #declare Beam = quadric { Cylinder_Y
  31.    scale <0.5 20.0 0.5>
  32.    translate <2.0 0.0 0.0>
  33. }
  34.  
  35. /* create a sample column for the base of the structure */
  36. #declare BaseColumn = object {
  37.    intersection {
  38.       union {
  39.          quadric { Beam }
  40.          quadric { Beam rotate <0.0 -25.7  0.0> }
  41.          quadric { Beam rotate <0.0 -51.4  0.0> }
  42.          quadric { Beam rotate <0.0 -77.1  0.0> }
  43.          quadric { Beam rotate <0.0 -102.8 0.0> }
  44.          quadric { Beam rotate <0.0 -128.5 0.0> }
  45.          quadric { Beam rotate <0.0 -154.2 0.0> }
  46.          quadric { Beam rotate <0.0 -179.9 0.0> }
  47.          quadric { Beam rotate <0.0 -205.6 0.0> }
  48.          quadric { Beam rotate <0.0 -231.3 0.0> }
  49.          quadric { Beam rotate <0.0 -257.0 0.0> }
  50.          quadric { Beam rotate <0.0 -282.7 0.0> }
  51.          quadric { Beam rotate <0.0 -308.4 0.0> }
  52.          quadric { Beam rotate <0.0 -334.1 0.0> }
  53.       }
  54.       plane { <0.0 1.0 0.0> 20.0 }
  55.       plane { <0.0 -1.0 0.0> 0.0 }
  56.    }
  57.    bounded_by {
  58.       intersection {
  59.          plane { <0.0 1.0 0.0> 20.0 }
  60.          plane { <0.0 -1.0 0.0> 0.0 }
  61.          quadric {
  62.             Cylinder_Y
  63.             scale <2.51 1.0 2.51>
  64.          }
  65.       }
  66.    }
  67.    texture {
  68.       White_Marble
  69.       scale <10.0 10.0 10.0>
  70.       ambient 0.4
  71.       diffuse 0.9
  72.       reflection 0.1
  73.    }
  74.    colour red 0.8 green 0.0 blue 0.0
  75. }
  76.  
  77. /* and a rectangular pad to serve as a footing for the column */
  78. #declare BasePad = object {
  79.    intersection { Cube
  80.       scale <4.0 1.0 4.0>
  81.    }
  82.    bounded_by {
  83.       quadric {
  84.          Ellipsoid
  85.          scale <10.0 3.0 10.0>
  86.       }
  87.    }
  88.    texture {
  89.       White_Marble
  90.       scale <10.0 10.0 10.0>
  91.       ambient 0.4
  92.       diffuse 0.9
  93.       reflection 0.1
  94.    }
  95.    colour red 0.6 green 0.6 blue 0.4
  96. }
  97.  
  98. #declare Globe = object {
  99.    sphere { <0.0 0.0 0.0> 5.0 }
  100.    texture {
  101.       Mirror
  102.       color Blue
  103.    }
  104.    color Blue
  105. }
  106.  
  107. #declare Garden_Globe = composite {
  108.    object { BaseColumn translate <0.0 0.0 0.0>   }
  109.    object { BasePad    translate <0.0 -1.0 0.0>  }
  110.    object { BasePad    translate <0.0 21.0 0.0>  }
  111.    object { Globe      translate<0.0 26.0 0.0> }
  112. }
  113. /********************* End of Garden Globe Epic *******************************/
  114.  
  115. /* Everybody's gotta have a point of view. */
  116. camera {
  117. //   location <0.0  30.0  -120.0>
  118.    location <-52.0  26.0  8.0>
  119.    direction <0.0 0.0  1.0>
  120.    up  <0.0  1.0  0.0>
  121.    right <1.33333 0.0 0.0>
  122. //   look_at <0.0 0.0 0.0>
  123.    look_at <-60.0 26.0 0.0>
  124. }
  125.  
  126. /* No, fool... i said _bud_ light! */
  127. object {  
  128.    light_source { <100.0  200.0  -200.0>
  129.       colour White
  130.    }
  131. }
  132.  
  133. /* "The sky was the color of her eyes" */
  134. /*             ... and just as cloudy! */
  135. object {
  136.    sphere { <0.0 -10000.0 -200.0> 15000.0 }
  137.    texture {
  138.       Bright_Blue_Sky
  139.       scale <7500.0 1000.0 5000.0>
  140.       ambient 0.7
  141.       diffuse 0.0
  142.    }
  143.    colour red 0.5 green 0.5 blue 1.0
  144. }
  145.  
  146. /* Plant a little grass, well mowed. */
  147. object {
  148.    plane { <0.0 1.0 0.0> 0.0 }
  149.    texture {
  150.       color Green
  151.       ripples 0.5
  152.       frequency 2000.0
  153.       scale <50000.0 50000.0 50000.0>
  154.    }
  155.    color Green
  156. }
  157.  
  158. /* Now, we pour the concrete and set the tiles...*/
  159. object {
  160.    difference {
  161.       intersection { Cube
  162.          scale <45.0 10.0 60.0>
  163.       }
  164.       intersection { Cube /* Inside box */
  165.          scale <35.0 11.0 50.0>
  166.       }
  167.    }
  168.    translate <0.0 -8.0 0.0 >
  169.    texture {
  170.       checker colour DarkTurquoise colour White
  171.       scale <2.0 2.0 2.0>
  172.    }
  173.    color DarkTurquoise
  174. }
  175.  
  176. /* Better put some water in the pool! */
  177. object {
  178.    intersection { Cube
  179.       scale <35.0 10.0 50.0>
  180.       translate<0.0 -9.0 0.0>
  181.    }
  182.    texture {
  183.       color LightBlue               /*alpha 0.5 ?*/
  184.       ripples 0.5
  185.       frequency 100.0
  186.       scale <5.0 5.0 10.0>
  187.       translate <20.0 4.0 -15.0>    /* Where the ball floats?? */
  188.       reflection 0.5
  189.       brilliance 3.0
  190.       /*??     refraction 1.0        { Doesn't really help the scene any... }
  191.         ior 1.2 ?? */
  192.    }
  193.    color LightBlue
  194. }
  195.  
  196. /* Let's add a diving board */
  197. object {
  198.    union {
  199.       intersection { Cube                        /* The board itself */
  200.          scale <6.0 1.0 30.0 >
  201.          translate <0.0 2.0 -30.0>
  202.       }
  203.       intersection { Cube                        /* a block under the board */
  204.          scale <6.0 2.0 2.0 >
  205.          translate <0.0 1.0 -30.0>
  206.       }
  207.    }
  208.    texture {
  209.       Cherry_Wood
  210.       scale <0.02 0.02 0.02>
  211.    }
  212.    color Brown
  213. }
  214.  
  215. /* Float a red and white striped ball in the pool */
  216. object {
  217.    sphere { <0.0 0.0 0.0> 5.0 }
  218.    translate <20.0 4.0 -15.0>    /* Sorta right front center of pool */
  219.    texture {
  220.       gradient < 1.0 1.0 0.0 >
  221.       colour_map {
  222.          [0.00 0.25  colour White colour White ]
  223.          [0.25 0.75  colour red 1.0  colour red 1.0]
  224.          [0.75 1.001 colour White colour White ]
  225.       }
  226.       scale <7.0 7.0 7.0>
  227.       rotate <-30.0 30.0 0.0>
  228.       ambient 0.3
  229.       diffuse 0.7
  230.       phong 0.5
  231.       phong_size 10.0
  232.    }
  233.    color Red
  234. }
  235.  
  236. /* Place the garden globe on left side of pool */
  237. composite { Garden_Globe translate <-60.0 0.0 0.0> }
  238.  
  239. /* The hedge behind the pool */
  240. object {
  241.    intersection { Cube }
  242.    scale <200.0 30.0 30.0>
  243.    translate <-100.0 0.0 180.0>
  244.    texture {
  245.       color YellowGreen
  246.       turbulence 0.5
  247.       spotted 0.5
  248.       colour_map {
  249.          [0.00 0.25  colour YellowGreen colour Green ]
  250.          [0.25 0.75  colour Green colour DarkGreen]
  251.          [0.75 1.001 colour DarkGreen colour YellowGreen ]
  252.       }
  253.       wrinkles 1.0
  254.       frequency 2000.0
  255.       scale <10.0 10.0 20.0>
  256.    }
  257.    color YellowGreen
  258. }
  259.  
  260. /* The hedge on the right side of pool */
  261. object {
  262.    intersection { Cube }
  263.    scale <30.0 30.0 100.0>
  264.    translate <100.0 0.0 -85.0>
  265.    texture {
  266.       color YellowGreen
  267.       turbulence 0.5
  268.       spotted 0.5
  269.       colour_map {
  270.          [0.00 0.25  colour YellowGreen colour Green ]
  271.          [0.25 0.75  colour Green colour DarkGreen]
  272.          [0.75 1.001 colour DarkGreen colour YellowGreen ]
  273.       }
  274.       wrinkles 1.0
  275.       frequency 2000.0
  276.       scale <10.0 10.0 20.0>
  277.    }
  278.    color YellowGreen
  279. }
  280.  
  281. /* a low, squat shrub of some generic species */
  282. object {
  283.    quadric { Ellipsoid }
  284.    scale <30.0 20.0 25.0>
  285.    translate <-70.0 0.0 110.0>
  286.    texture {
  287.       color YellowGreen
  288.       turbulence 0.5
  289.       spotted 1.0
  290.       colour_map {
  291.          [0.00 0.25  colour Khaki colour Green ]
  292.          [0.25 0.50  colour Green colour DarkGreen]
  293.          [0.50 0.75  colour DarkGreen colour MediumForestGreen]
  294.          [0.75 1.001 colour MediumForestGreen colour YellowGreen ]
  295.       }
  296.       wrinkles 1.0
  297.       frequency 2000.0
  298.       scale <5.0 5.0 5.0>
  299.    }
  300.    color YellowGreen
  301. }
  302.